package com.qingke.oms.command.user;

import com.qingke.oms.command.UserCommand;
import com.qingke.oms.pojo.User;
import com.qingke.oms.util.OMSConsole;

public class RegisterShopCommand extends UserCommand {

	public RegisterShopCommand(User user) {
		super(user);
	}

	@Override
	public void execute() {
		String shopName=OMSConsole.promptNotEmpty("shop name:");
		String description=OMSConsole.promptCanEmpty("shop description:");
		if(dao.registerShop(user.getId(),shopName, description))
			OMSConsole.println("Register shop success");
		else
			OMSConsole.println("Register shop failed");
	}

}
